High-speed programming of memory devices

ABSTRACT

A method for operating a memory that includes a plurality of analog memory cells includes storing data in a first group of the memory cells by writing respective first cell values to the memory cells in the first group. After storing the data, respective second cell values are read from the memory cells in the first group, and differences are found between the respective first and second cell values for each of one or more of the memory cells in the first group. The differences are processed to produce error information, and the error information is stored in a second group of the memory cells.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Patent Application 60/870,399, filed Dec. 17, 2006, whose disclosure is incorporated herein by reference.

FIELD OF THE INVENTION

The present invention relates generally to memory devices, and particularly to methods and systems for high-speed programming of analog memory cells.

BACKGROUND OF THE INVENTION

Several types of memory devices, such as Flash memories, use arrays of analog memory cells for storing data. Each analog memory cell stores a quantity of an analog value, such as an electrical charge or voltage, which represents the information stored in the cell. In Flash memories, for example, each analog memory cell holds a certain amount of electrical charge. The range of possible analog values is typically divided into regions, each region corresponding to one or more data bit values. Data is written to an analog memory cell by writing a nominal analog value that corresponds to the desired bit or bits.

Some memory devices, commonly referred to as Single-Level Cell (SLC) devices, store a single bit of information in each memory cell, i.e., each memory cell can be programmed to assume two possible memory states. Higher-density devices, often referred to as Multi-Level Cell (MLC) devices, store two or more bits per memory cell, i.e., can be programmed to assume more than two possible memory states.

Flash memory devices are described, for example, by Bez et al., in “Introduction to Flash Memory,” Proceedings of the IEEE, volume 91, number 4, April, 2003, pages 489-502, which is incorporated herein by reference. Multi-level Flash cells and devices are described, for example, by Eitan et al., in “Multilevel Flash Cells and their Trade-Offs,” Proceedings of the 1996 IEEE International Electron Devices Meeting (IEDM), New York, N.Y., pages 169-172, which is incorporated herein by reference. The paper compares several kinds of multilevel Flash cells, such as common ground, DINOR, AND, NOR and NAND cells.

Eitan et al., describe another type of analog memory cell called Nitride Read Only Memory (NROM) in “Can NROM, a 2-bit, Trapping Storage NVM Cell, Give a Real Challenge to Floating Gate Cells?” Proceedings of the 1999 International Conference on Solid State Devices and Materials (SSDM), Tokyo, Japan, Sep. 21-24, 1999, pages 522-524, which is incorporated herein by reference. NROM cells are also described by Maayan et al., in “A 512 Mb NROM Flash Data Storage Memory with 8 MB/s Data Rate”, Proceedings of the 2002 IEEE International Solid-State Circuits Conference (ISSCC 2002), San Francisco, Calif., Feb. 3-7, 2002, pages 100-101, which is incorporated herein by reference. Other exemplary types of analog memory cells are Floating Gate (FG) cells, Ferroelectric RAM (FRAM) cells, magnetic RAM (MRAM) cells, Charge Trap Flash (CTF) and phase change RAM (PRAM, also referred to as Phase Change Memory—PCM) cells. FRAM, MRAM and PRAM cells are described, for example, by Kim and Koh in “Future Memory Technology including Emerging New Memories,” Proceedings of the 24^(th) International Conference on Microelectronics (MIEL), Nis, Serbia and Montenegro, May 16-19, 2004, volume 1, pages 377-384, which is incorporated herein by reference.

Analog memory cells are often programmed using Program and Verify (P&V) processes. In a typical P&V process, a cell is programmed by applying a sequence of voltage pulses, whose voltage level increases from pulse to pulse. The programmed voltage level is read (“verified”) after each pulse, and the iterations continue until the desired level is reached.

Various methods for increasing the speed of memory device programming are known in the art. For example, U.S. Pat. No. 7,177,200, whose disclosure is incorporated herein by reference, describes a method that initially programs a Flash memory device in a quick manner that produces relatively broad threshold voltage distributions, which would render the flash memory unreliable in the long term if left uncorrected. Then, while the host of the memory device is idle, the memory device shifts and tightens up its threshold voltage distributions sufficiently to obtain long-term reliability.

U.S. Patent Application Publication 2002/0118574, whose disclosure is incorporated herein by reference, describes a programming method, which programs each cell to its target state using a data-dependent programming voltage. In some embodiments, the programming operation is performed in multiphase wherein each successive phase is executed with a finer programming resolution, such as by employing a programming voltage with a gentler staircase waveform.

U.S. Pat. No. 6,301,151, whose disclosure is incorporated herein by reference, describes an adaptive programming method for Flash memory analog storage. The voltage of a programming pulse is adjusted based on the result of the previous pulse. The expected change in the programmed value is compared to the measured change, and the difference used to improve the model of that cell after each programming pulse.

U.S. Patent Application Publication 2006/0285396, whose disclosure is incorporated herein by reference, describes a programming process, which increases the programming voltage of successive programming cycles in relation to the percentage of the data bits that failed programming verification during the previous programming cycle and were not correctly programmed into the memory array.

SUMMARY OF THE INVENTION

Embodiments of the present invention provide a method for operating a memory that includes a plurality of analog memory cells, including:

storing data in a first group of the memory cells by writing respective first cell values to the memory cells in the first group;

after storing the data, reading respective second cell values from the memory cells in the first group, and finding differences between the respective first and second cell values for each of one or more of the memory cells in the first group;

processing the differences to produce error information; and

storing the error information in a second group of the memory cells.

In some embodiments, the second group of the memory cells is different from the first group. In an embodiment, writing the first cell values and reading the second cell values include programming the memory cells of the first group in an iterative Program and Verify (P&V) process.

In another embodiment, processing the differences includes quantizing the differences by mapping the differences to a finite set of difference indications, and storing the error information includes storing the quantized differences. Processing the differences may include adaptively controlling a size of the produced error information responsively to the quantized differences.

Typically, storing the data includes selecting the first cell values from a set of nominal values, and the difference indications indicate whether the nominal values corresponding to the read second cell values differ from the respective nominal values corresponding to the written first cell values. In some embodiments, for a given first cell value that corresponds to a first nominal value and a given second cell value that corresponds to a second nominal value, the difference indications include at least one of:

a first indication indicating that the first nominal value is lower than and adjacent to the second nominal value in the set of the nominal values;

a second indication indicating that the first nominal value is greater than and adjacent to the second nominal value in the set of the nominal values; and

a third indication indicating that the first nominal value is equal to the second nominal value.

In a disclosed embodiment, storing the error information includes compressing the error information and storing the compressed error information. Additionally or alternatively, storing the error information may include encoding the error information with an Error Correction Code (ECC) and storing the encoded error information. Further additionally or alternatively, storing the error information may include storing indices of the memory cells of the first group in which the differences were found.

In another embodiment, reading the second cell values and finding the differences are performed immediately after writing the first cell values, a predetermined time interval after writing the first cell values, and/or responsively to an event. In yet another embodiment, the memory cells in the first group are subject to interference from a third group of the memory cells, and reading the second cell values and finding the differences are performed after the memory cells in the third group have been programmed.

In some embodiments, the method further includes retrieving the stored data by retrieving the error information from the second group of the memory cells, reading third cell values from the cells in the first group, and processing the third cell values responsively to the retrieved error information to produce corrected data. Retrieving the stored data may include making an attempt to reconstruct the data from the third cell values without the error information, and retrieving the error information and processing the third cell values responsively to the retrieved error information upon a failure of the attempt.

In another embodiment, storing the data includes encoding the data with a code that detects errors in the data, and retrieving the stored data includes detecting the errors in the data using the code and updating the error information based on the third cell values when a number of the detected errors meets a predetermined condition. Updating the error information may be performed when the number of the detected errors exceeds a predetermined threshold.

In some embodiments, storing the data includes programming the first memory cells using first programming parameters such that the error information has a first size, and the method includes, after storing the error information:

reading the error information from the second group of the memory cells, reading third cell values from the cells in the first group, and reconstructing the data by processing the third cell values responsively to the read error information; and

re-programming the data using second programming parameters so as to produce refined error information having a second size, which is smaller than the first size.

There is additionally provided, in accordance with an embodiment of the present invention, apparatus for operating a memory that includes a plurality of analog memory cells, including:

Read/Write (R/W) circuitry, which is coupled to store data in a first group of the memory cells by writing respective first cell values to the memory cells in the first group and, after storing the data, to read respective second cell values from the analog memory cells in the first group; and

a processor, which is configured to find differences between the respective first and second cell values for each of one or more of the memory cells in the first group, to process the differences to produce error information and to store the error information in a second group of the memory cells.

There is also provided, in accordance with an embodiment of the present invention, apparatus for data storage, including:

a memory, which includes a plurality of analog memory cells;

Read/Write (R/W) circuitry, which is coupled to store data in a first group of the memory cells by writing respective first cell values to the memory cells in the first group and, after storing the data, to read respective second cell values from the analog memory cells in the first group; and

a processor, which is configured to find differences between the respective first and second cell values for each of one or more of the memory cells in the first group, to process the differences to produce error information and to store the error information in a second group of the memory cells.

The present invention will be more fully understood from the following detailed description of the embodiments thereof, taken together with the drawings in which:

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram that schematically illustrates a system for memory signal processing, in accordance with an embodiment of the present invention;

FIG. 2 is a diagram that schematically illustrates a memory cell array, in accordance with an embodiment of the present invention;

FIG. 3 is a diagram that schematically illustrates a memory partitioned into data storage and error storage areas, in accordance with an embodiment of the present invention;

FIG. 4 is a flow chart that schematically illustrates a method for storing data in a memory cell array, in accordance with an embodiment of the present invention;

FIG. 5 is a flow chart that schematically illustrates a method for retrieving data from a memory cell array, in accordance with an embodiment of the present invention;

FIG. 6 is a graph showing voltage distributions in a memory cell array, in accordance with an embodiment of the present invention; and

FIG. 7 is a flow chart that schematically illustrates a method for storing data in a memory cell array, in accordance with an embodiment of the present invention.

DETAILED DESCRIPTION OF EMBODIMENTS Overview

Iterative Program and verify (P&V) processes are characterized by a P&V step size, i.e., the increment in magnitude between successive programming pulses. The choice of P&V step size has considerable influence on memory device performance. In particular, the step size value sets a trade-off between the programming accuracy and the programming speed of the memory cells. When using a large P&V step size, cells can be programmed using a relatively small number of pulses, but the programming accuracy is degraded. The coarse programming accuracy often causes poorer error performance and/or lower storage capacity, especially in MLC devices. Programming the cells with a small P&V step size, on the other hand, achieves high accuracy (and consequently smaller error probability and higher capacity) at the expense of slower programming.

Embodiments of the present invention that are described hereinbelow provide improved methods and systems for operating arrays of analog memory cells. These methods and systems achieve high-accuracy programming of the cells while using a coarse P&V step size, and therefore provide an improved trade-off between accuracy and programming speed. As a result, systems that use the programming methods described herein can provide high-speed programming, high storage capacity and low error probabilities simultaneously.

In addition to increasing programming speed, the methods and systems described herein also assist in slowing down the wear of memory cells and in reducing the level of program disturb interference. Since programming cells with a small P&V step size often increases the stress and wearing of the cells and causes more program disturbs to other cells, the use of coarse P&V step size helps to reduce both of these undesirable effects.

In some embodiments, a Memory Signal Processor (MSP) stores data in an array of analog memory cells. The memory cell array is divided into a data storage area and an error storage area. Data is written to the memory cells of the data storage area in a fast P&V process that uses a coarse step size. As a result of the coarse step size, the analog values that are actually written to the cells may deviate from the intended target levels by respective residual programming errors. The MSP measures the residual errors, and stores information related to the residual errors in the error storage area of the memory cell array. When reading the cells, the MSP reads the error information from the error storage area, and combines it with the data read from the data storage area, so as to reconstruct the data with high accuracy.

The MSP may measure the residual errors and store the error information at any time, e.g., immediately following programming of the cells, after a certain time interval or in response to a certain event or condition. Delaying the measurement of the residual errors is sometimes advantageous, as it enables the MSP to compensate for various impairments that affect the cell values.

In some embodiments, the data stored in the data storage area is encoded with an Error Correction Code (ECC) having a finite correction capability. In these embodiments, the MSP may measure the residual errors and store the error information when the number of errors corrected by the ECC is close the correction capability of the code. Thus, the effective correction capability of the ECC is improved considerably.

System Description

FIG. 1 is a block diagram that schematically illustrates a system 20 for memory signal processing, in accordance with an embodiment of the present invention. System 20 can be used in various host systems and devices, such as in computing devices, cellular phones or other communication terminals, removable memory modules (“disk-on-key” devices), digital cameras, music and other media players and/or any other system or device in which data is stored and retrieved.

System 20 comprises a memory device 24, which stores data in a memory cell array 28. The memory array comprises multiple analog memory cells 32. In the context of the present patent application and in the claims, the term “analog memory cell” is used to describe any memory cell that holds a continuous, analog value of a physical parameter, such as an electrical voltage or charge. The analog values are also referred to herein as cell values.

Array 28 may comprise analog memory cells of any kind, such as, for example, NAND, NOR and CTF Flash cells, PCM, NROM, FRAM, MRAM and DRAM cells. The charge levels stored in the cells and/or the analog voltages or currents written into and read out of the cells are referred to herein collectively as analog values.

System 20 stores data in the analog memory cells by programming the cells to assume respective memory states. The memory states are selected from a finite set of possible states, and each state corresponds to a certain nominal analog value. For example, a 2 bit/cell MLC can be programmed to assume one of four possible memory states by writing one of four possible nominal analog values into the cell.

Data for storage in memory device 24 is provided to the device and cached in data buffers 36. The data is then converted to analog voltages and written into memory cells 32 using a reading/writing (R/W) unit 40, whose functionality is described in greater detail below. When reading data out of array 28, R/W unit 40 converts the electrical charge, and thus the analog voltages of memory cells 32, into digital samples having a resolution of one or more bits. The samples are cached in buffers 36. The operation and timing of memory device 24 is managed by control logic 48.

The storage and retrieval of data in and out of memory device 24 is performed by a Memory Signal Processor (MSP) 52. MSP 52 comprises a signal processing unit 60, which processes the data that is written into and read from device 24.

In some embodiments, unit 60 encodes the data to be written into the memory cells using an Error Correction Code (ECC), and decodes the ECC of the retrieved data. Unit 60 may use any suitable type of ECC. ECC schemes that may be used by unit 60 may comprise, for example, various block codes such as Bose-Chaudhuri-Hocquenghem (BCH) codes, Reed-Solomon (RS) codes, Low Density Parity Check (LDPC) codes, turbo codes or a turbo product codes (TPC). Alternatively, unit 60 may use a convolutional ECC, a concatenated ECC, a trellis code or other signal-space code, or a multi-level ECC.

In particular, MSP 52 carries out methods for high-speed, high-accuracy programming of cells 32, as will be described in detail below.

MSP 52 comprises a data buffer 72, which is used by unit 60 for storing data and for interfacing with memory device 24. MSP 52 also comprises an Input/Output (I/O) buffer 56, which forms an interface between the MSP and the host system. A controller 76 manages the operation and timing of MSP 52. Signal processing unit 60 and controller 76 may be implemented in hardware. Alternatively, unit 60 and/or controller 76 may comprise microprocessors that run suitable software, or a combination of hardware and software elements.

The configuration of FIG. 1 is an exemplary system configuration, which is shown purely for the sake of conceptual clarity. Any other suitable configuration can also be used. Elements that are not necessary for understanding the principles of the present invention, such as various interfaces, addressing circuits, timing and sequencing circuits and debugging circuits, have been omitted from the figure for clarity.

In the exemplary system configuration shown in FIG. 1, memory device 24 and MSP 52 are implemented as two separate Integrated Circuits (ICs). In alternative embodiments, however, the memory device and MSP may be integrated on separate semiconductor dies in a single Multi-Chip Package (MCP) or System on Chip (SoC). Further alternatively, some or all of the MSP circuitry may reside on the same die on which memory array 28 is disposed. Further alternatively, some or all of the functionality of MSP 52 can be implemented in software and carried out by a processor or other element of the host system. In some implementations, a single MSP 52 may be connected to multiple memory devices 24.

In a typical writing operation, data to be written into memory device 24 is accepted from the host and cached in I/O buffer 56. The data is transferred, via data buffers 72, to memory device 24. The data may be pre-processed by MSP 52 before it is transferred to the memory device for programming. For example, unit 60 may encode the data using an ECC, add certain data for internal use, and/or scramble the data. In device 24 the data is temporarily stored in buffers 36. R/W unit 40 converts the data to nominal analog values and writes the nominal values into the appropriate cells 32 of array 28.

In a typical reading operation, R/W unit 40 reads analog values out of the appropriate memory cells 32 and converts them to soft digital samples. The samples are cached in buffers 36 and transferred to buffers 72 of MSP 52. In some embodiments, unit 60 of MSP 52 converts the samples to data bits.

FIG. 2 is a diagram that schematically illustrates memory cell array 28, in accordance with an embodiment of the present invention. Although FIG. 2 refers to Flash memory cells that are connected in a particular array configuration, the principles of the present invention are applicable to other types of memory cells and other array configurations, as well. Some exemplary cell types and array configurations are described in the references cited in the Background section above.

Memory cells 32 of array 28 are arranged in a grid having multiple rows and columns. Each cell 32 comprises a floating gate Metal-Oxide Semiconductor (MOS) transistor. A certain amount of electrical charge (electrons or holes) can be stored in a particular cell by applying appropriate voltage levels to the transistor gate, source and drain. The value stored in the cell can be read by measuring the threshold voltage of the cell, which is defined as the minimal voltage that needs to be applied to the gate of the transistor in order to cause the transistor to conduct. The read threshold voltage is indicative of the charge stored in the cell.

In the exemplary configuration of FIG. 2, the gates of the transistors in each row are connected by word lines 80. The sources of the transistors in each column are connected by bit lines 84. In some embodiments, such as in some NOR cell devices, the sources are connected to the bit lines directly. In alternative embodiments, such as in some NAND cell devices, the bit lines are connected to strings of floating-gate cells.

The memory cell array is typically divided into multiple pages, i.e., groups of memory cells that are programmed and read simultaneously. Pages are sometimes sub-divided into sectors. In some embodiments, each page comprises an entire row of the array. In alternative embodiments, each row (word line) can be divided into two or more pages. For example, in some SLC devices each row is divided into two pages, one comprising the odd-order cells and the other comprising the even-order cells. In a typical implementation, a two-bit-per-cell memory device may have four pages per row, a three-bit-per-cell memory device may have six pages per row, and a four-bit-per-cell memory device may have eight pages per row.

Erasing of cells is usually carried out in blocks that contain multiple pages. Typical memory devices may comprise several thousand erasure blocks. In a typical two-bit-per-cell MLC device, each erasure block is on the order of 32 word lines, each comprising several thousand cells. Each word line of such a device is often partitioned into four pages (odd/even order cells, least/most significant bit of the cells). Three-bit-per cell devices having 32 word lines per erasure block would have 192 pages per erasure block, and four-bit-per-cell devices would have 256 pages per block. Alternatively, other block sizes and configurations can also be used.

Some memory devices comprise two or more separate memory cell arrays, often referred to as planes. Since each plane has a certain “busy” period between successive write operations, data can be written alternately to the different planes in order to increase programming speed.

High-Speed Programming Methods

R/W unit 40 programs memory cells 32 of array 28 using an iterative Program and Verify (P&V) process, as is known in the art. The P&V process is usually applied simultaneously to a certain memory page. When programming a given page, the R/W unit applies a train of incrementally-increasing programming pulses to the cells of the page. The level of each pulse is higher than the previous pulse by a certain step size. The R/W unit reads the analog values of the cells following each pulse and checks whether the analog values stored in the cells (e.g., threshold voltages) have reached their intended target levels.

The R/W unit stops applying pulses to cells that have reached their target levels. The iterations continue selectively, programming for the cells that have not yet reached the desired levels. The iterative process typically continues until all cells in the page are successfully programmed, or until a predetermined maximum number of iterations are performed. Note that different cells in the page may have different target levels, such as because they are to be programmed with different data. Moreover, the number of iterations needed to reach a certain level may vary statistically from cell to cell.

As noted above, the choice of P&V step size sets a trade-off between the programming accuracy and the programming speed of the cells. When using a large P&V step size, cells can be programmed using a relatively small number of pulses, but the programming accuracy is poorer. Coarse programming accuracy often translates to poorer error performance and/or lower storage capacity, especially in MLC devices. When using a small P&V step size, on the other hand, high accuracy can be achieved at the expense of slower programming.

Embodiments of the present invention provide improved methods and systems for programming analog memory cells, which achieve high-accuracy programming of the cells while using a coarse P&V step size, and therefore provide an improved trade-off between accuracy and programming speed. In some embodiments that are described in detail below, the memory cell array is divided into a data storage area and an error storage area. Data is written to the memory cells of the data storage area in a fast P&V process that uses a coarse step size. As a result of the coarse step size, the analog values that are actually written to the cells may deviate from the intended target levels by respective residual programming errors. The MSP estimates the residual errors, and stores information related to the residual errors in the error storage area of the memory cell array. This information is referred to herein as “error information.” When reading the cells, the MSP reads the error information from the error storage area, and combines it with the data read from the data storage area, so as to reconstruct the data with high accuracy.

FIG. 3 is a diagram that schematically illustrates a memory cell array 90, in accordance with an embodiment of the present invention. Array 90 comprises multiple memory pages, and is partitioned into a data storage area 94 and an error storage area 98. The data storage area comprises N data storage pages 102, and the error storage area comprises K error storage pages 106. K is typically much smaller than N. Array 90 may comprise, for example, a single erasure block, several erasure blocks or any other suitable set of pages. MSP 52 stores data and error information in areas 94 and 98, respectively. For example, some or all of array 28 in the configuration of FIG. 1 above can be partitioned in this manner.

Although the example of FIG. 3 shows a configuration in which the data storage area and the error storage area comprise separate sets of memory pages, the methods and systems described herein are not limited to such configurations. The data storage area and the error storage area may comprise any suitable groups of memory cells, or even individual bits within memory cells, which may reside in separate or overlapping sectors, pages, blocks, planes, dies or memory devices.

For example, the error information of a certain page or word line can be stored in some of the cells of a subsequent page or word line. Using this technique, some of the cells in each page or word line are used for storing data and some are used for storing error information of another page or word line. In some embodiments, the error information is encoded with an ECC for extra protection.

FIG. 4 is a flow chart that schematically illustrates a method for storing data in a memory cell array, in accordance with an embodiment of the present invention. The array is assumed to be partitioned into a data storage area and an error storage area, as described above.

The method begins with MSP 52 accepting data for storage in the memory array. The MSP stores the data in the data storage area, at a data storage step 110. The MSP maps the data to corresponding analog values, and R/W unit 40 writes these values to the cells. The R/W unit programs the cells using a fast P&V process that uses a coarse P&V step size. As a result, the analog values that are actually stored in the cells may deviate from the intended values by respective residual errors.

The MSP determines the residual errors, at an error calculation step 114. For example, the MSP may read the analog values from the cells and compare them with the target values the cells were intended to hold. The MSP may determine the residual errors based on quantized values of the analog values, such as by performing hard read operations that compare the analog values to certain read thresholds, and determining the residual errors based on the comparison results. In other words, the residual error of a certain analog value, which was expected to fall in a certain interval of analog values, can be based on whether or not the analog value falls inside or outside of this interval.

In some embodiments, e.g., when the error measurement is carried out immediately following programming of the cells, the MSP uses the analog values that were already read from the cells in the last verify operation for this purpose. Alternatively, the MSP may read the cells and measure the residual errors at a later time, as described further below. Further alternatively, the memory device may report the residual errors to the MSP.

The MSP quantizes and compresses the residual errors, at a quantization and compression step 118. The MSP stores the quantized and compressed residual errors in the error storage area, at an error storage step 122. In some embodiments, the MSP encodes the error information using an ECC before storing it. In the example of FIG. 4, the MSP uses the quantized and compressed error magnitudes as the error information. In alternative embodiments, other types of error information can also be used. Several examples are described further below.

The R/W unit programs the cells at high speed, by using a coarse P&V step size. The additional programming operations needed for storing the residual errors incur some overhead. Nevertheless, the P&V process parameters (e.g., the step size and the maximum number of iterations) are chosen so that the overall programming speed is considerably improved, in comparison to a scheme that uses a fine P&V step size.

The overall programming time of a block comprising N data storage pages and K error storage pages is reduced by a factor of

$T_{RATIO} = {\frac{{N \cdot T_{FAST}} + {K \cdot T_{REGULAR}}}{N \cdot T_{REGULAR}} = {{\frac{T_{FAST}}{T_{REGULAR}} + \frac{K}{N}}_{N\operatorname{>>}K}{\approx \frac{T_{FAST}}{T_{REGULAR}}}}}$

wherein T_(FAST) denotes the page programming time using the coarse P&V step size and T_(REGULAR) denotes the page programming time using a fine P&V step size used as reference. In the equation above, the pages in the error storage area are assumed to be programmed with the fine P&V step size. In alternative embodiments, however, the pages in the error storage area may be programmed with any suitable P&V step size, such as using the coarse P&V step size used for programming the pages in the data storage area.

Since K out of the total N+K pages are allocated to error storage, the data capacity of the block is reduced by a factor of C_(RATIO)=N/(N+K). Both T_(RATIO) and C_(RATIO) can be adjusted by changing the P&V step size and the maximum number of P&V iterations.

FIG. 5 is a flow chart that schematically illustrates a method for retrieving data from a memory cell array, in accordance with an embodiment of the present invention. The data is assumed to be stored using the method of FIG. 4 above. The method begins with the MSP reading the error information (in the present example, the quantized and compressed residual errors) from the error storage area, at an error reading step 126. The MSP decompresses the errors, at a decompression step 130. In configurations in which the error information is encoded, the MSP decodes the ECC at this stage.

The MSP reads the data stored in the data storage area, at a data reading step 134. Since the data was stored using a large P&V step size, the analog values read from the cells may have large deviations from the corresponding target values. The MSP corrects these deviations using the error information retrieved at steps 126 and 130 above. The MSP decodes and reconstructs the data by combining the data read from the data storage area and the error information read from the error storage area, at a decoding step 138.

In some embodiments, the MSP caches error information that was previously read, so that not every read operation from the data storage area necessarily requires another read operation from the error storage area. For example, since typically K<N, a certain error storage page may contain error information pertaining to multiple data storage pages. Thus, the MSP may cache the read error storage pages and, when a data storage page is read, used the cached error information for this page, if available.

In some embodiments, the MSP may read and use the error information only selectively, e.g., when the data retrieved from the data storage area cannot be retrieved successfully. In these embodiments, the MSP first reads the data from the data storage area and attempts to reconstruct it without error information. If data reconstruction is successful, the MSP does not read the error information from the error storage area, thus reducing the number of read operations. If data reconstruction fails, the MSP reads the error information and uses it to reconstruct the data.

The MSP can determine whether data reconstruction is successful using any suitable method. For example, the MSP may encode the data stored in the data storage area with an ECC, or with an error detection code such as a Cyclic Redundancy Check (CRC). The MSP reverts to reading and using the error information when the ECC cannot be decoded successfully or when the error detection code indicates an error.

FIG. 6 is a graph showing threshold voltage distributions in a memory cell array, in accordance with an embodiment of the present invention. In the present example, the cells of the memory array have three possible states, represented by three nominal threshold voltage levels. Because of the residual errors of the P&V process, the analog values that are actually programmed in the cells deviate statistically around the nominal values. (The stored analog values may also deviate from the nominal values for other reasons, such as due to various impairments and inaccuracies, some of which are addressed further below.)

Curves 140A . . . 140C show the threshold voltage distributions of the cells that were respectively programmed to the three different states. The cells are read by comparing their analog values to two thresholds 144A and 144B.

In the present example, curves 140A . . . 140C show the voltage distributions that are produced when programming the cells with a fine P&V step size. As can be appreciated, the distributions are relatively well separated from one another, so that the probability of error (i.e., a cell being programmed to a certain state but its analog value falling in an interval that corresponds to another state) is low.

A curve 148 shows a voltage distribution that is produced when programming the cells to the middle state using a coarse P&V step size. As can be seen in the figure, the variance of distribution 148 is considerably larger than the variance of distribution 140B. Programming with a smaller P&V step size can be viewed as tightening the threshold voltage distribution around the intended target value, and vice versa.

A non-negligible portion of distribution 148 falls below threshold 144A and above threshold 144B. These portions of the distribution are likely to correspond to errors. Thus, the error probability associated with a coarse P&V step size is considerably larger than the probability of error achieved by a small P&V step size. The parameters of the P&V process (e.g., the P&V step size and the maximum number of iterations) can be chosen so as to adjust the probability of error. Typically but not necessarily, the P&V parameters are chosen so that the number of cells whose analog values fall on the wrong side of the threshold is on the order of a few percents.

When errors occur, the analog value is most likely to fall in an adjacent state and not in a state that is further away. Thus, the residual errors can often be quantized into three possible values: {−1,0,+1}, respectively indicating an error falling in the next-lower adjacent state, no error, and an error falling in the next-higher adjacent state. Alternatively, the P&V step size and the programming thresholds can be selected so that the residual errors can be quantized into two possible values of {0,+1}.

In some embodiments, the MSP produces a vector of residual error values, whose elements comprise the quantized errors of the different cells. Typically, most of the vector elements will be zero, with an occasional 1 or −1 value. Such a vector can be efficiently compressed using any suitable lossless or lossy compression method known in the art, such as by using run length encoding, using methods based on the well-known Lempel-Ziv algorithm, or any other suitable method. As another example, the MSP may store only the indices of the cells in which errors were detected along with the quantized values of these errors. Alternatively, the MSP may encode the error vector using run-length encoding.

FIG. 7 is a flow chart that schematically illustrates a method for storing data in a memory cell array, in accordance with an embodiment of the present invention. FIG. 7 shows a P&V process that programs a block of N pages, which roughly corresponds to steps 110 and 114 of the method of FIG. 4 above. The process comprises an outer loop (steps 154-174), which runs over the N pages of the block, and an inner loop (steps 158-166), which runs over the P&V iterations of a certain page.

The method begins with the MSP initializing a page counter to zero, at a block initialization step 150. In order to program the current page, the MSP initializes the variables of the page, at a page initialization step 154 the MSP increments the page counter to reflect the current page number, initializes the P&V iteration counter (denoted i) to zero, and gets the data to be written to the page (denoted D). Then, the MSP and R/W unit carry out the inner loop (P&V) process for programming the current page.

The R/W unit carries out the i^(th) P&V iteration, at a P&V iteration step 158. In this step, the R/W unit increments the iteration counter i, writes the analog values of iteration i (denoted D(i) ) to the memory cells of the page, and reads the values from the programmed cells in order to verify them. The error of iteration i is calculated by comparing the read values (denoted P(i)) with the written values D(i). (The written values D(i) may differ from one P&V iteration to another since the programming of cells stops when reaching their intended levels.)

The R/W unit checks whether the error after the i^(th) iteration is smaller than a predetermined threshold, at a threshold comparison step 162. Note that D(i), P(i), used in step 158, as well as the difference between them denoted ERROR(i), are vectors whose elements correspond to the individual cells in the programmed page.

The MSP counts the number of cells in the page having an error. If this number is larger than the threshold, the R/W unit checks whether the maximum number of iterations is completed, at a maximum iterations checking step 166.

If not (i.e., when the number of cells that have not reached their intended levels exceeds the threshold, and provided the maximum number of iterations have not yet been exhausted), the R/W determines the analog values to be written in the next iteration, at a next iteration data calculation step 168. The R/W unit calculates D(i+1) based on the residual error of the previous iteration and on the values D(i) of the previous iteration. Typically, D(i+1) comprises values for only the cells that have not yet reached their target levels. The method then loops back to step 158 above, in which the R/W unit carries out the next P&V iteration.

If, on the other hand, programming of the current page is completed (either because all cells reached their intended levels or because the maximum number of iterations have been completed), the MSP caches the residual errors of the current page, at a caching step 170.

The MSP checks whether all N pages have been programmed, at a page checking step 174. If not all pages have been programmed, the method loops back to step 154 above for programming the next page. Otherwise, the method terminates, at a termination step 182. At this stage, the MSP holds the cached residual errors of the memory cells in the N pages, and is able to derive the error information and store it in the error storage area.

In some embodiments, the MSP sets and controls the size of the error information, and thus allocates space in the error storage area, in a dynamic and flexible manner. For a certain body of data stored in the data storage area, the MSP may allocate cells in the error storage area depending on the number and type (e.g., severity) of errors that were found in the cells that store the data, and/or the available space in the error storage area.

In a certain implementation, the MSP may allocate one data page (e.g., 4K bytes) for storing the error information related to a group of 255 data pages. When performing the method of FIG. 7 above, the MSP can modify the threshold used in step 162 based on the amount of memory that was already allocated for storing error information and/or the number of pages that still remain to be programmed. For example, assume a situation in which the MSP has already programmed N/4 out of the N data pages, and has already allocated 50% of the space allocated for error information for storing the error information of these N/4 pages. In such a scenario, the MSP can lower the threshold used in step 162 in order not to exceed the space available for error information. The use of a lower threshold reduces the size of the error information and extends the programming time.

When using the programming methods described herein, the MSP can control the size of the error storage area and the programming speed by selecting different programming parameters, such as the P&V step size and/or the P&V termination threshold (the threshold used in step 162 of FIG. 7). Different choices of programming parameters provide different capacity/speed trade-offs.

In some embodiments, the MSP may initially store the data with a certain choice of programming parameters, which provide fast programming at the expense of lower memory capacity. At a later stage, the MSP can reconstruct the data using the error information, and re-program the data in a different area of the memory using programming parameters that provide higher capacity. The reconstruction and re-programming operations may be carried out by a background task.

For example, the MSP may initially program the data using a relatively coarse P&V step size, which achieves fast programming but generates a large amount of error information. At a later time, the MSP can reconstruct the data using the error information, and re-program the data using a smaller P&V step size. The error information produced by the re-programming operation occupies less memory space than the original error information, because of the smaller P&V step size.

As noted above, the MSP sometimes compresses the error information. In some embodiments, the interface between the MSP and the memory device (or more specifically, the interface between the MSP and the R/W unit) contains commands that transfer the compressed error information, and thus reduce the data transfer between the MSP and the memory. For example, since in many practical cases the majority of (quantized) errors are zero, the R/W unit can send only the indices and values of the non-zero elements in the error vector to the MSP.

Additionally or alternatively, the R/W unit may calculate statistical characteristics of the errors, and transfer these characteristics to the MSP. In particular, the R/W unit may calculate and transfer a histogram of quantized error values, e.g., the number of elements in the error vector that are equal to each possible quantized error value. The MSP can use the statistical characteristics sent by the memory device for deciding when to terminate the programming operation, and/or for determining the error information parameters.

Delayed Measurement of the Residual Errors

In the description above, the MSP measures the residual errors for the cells of a certain page immediately after programming the page. In alternative embodiments, the MSP measures the residual errors at a later time, or in response to a certain event or condition that occurs after the page was programmed. In many practical cases, the delayed error measurement provides considerable performance benefits.

For example, in some memory devices, the analog values of memory cells in a certain page are affected by other pages, such as by the values stored in the cells of the other pages and/or by memory access operations performed on the other pages. Such impairments may comprise, for example, cross-coupling interference between cells of different pages and/or disturb noise caused in a certain page by read and write operations on another page. In such cases, the MSP may measure the residual errors of a certain page after the potentially-interfering pages have also been programmed. When the residual errors are measured after the potentially-interfering pages have already been programmed, the residual errors of the interfered page will contain the impairment effects caused by these pages. When the residual errors reflect the impairments, the MSP will inherently compensate for the impairments when decoding the data based on the error information.

Delayed measurement of the residual errors may also improve performance in the presence of aging effects. Aging is a process in which the analog value stored in the cell gradually drifts over time from the initially-programmed value. Experience shows that in some memory devices the analog values drift considerably during the first few minutes after programming. Thus, measuring the residual programming errors a few minutes after the page is programmed causes the residual errors to contain the initial drift, which can then be compensated for during reading.

Delayed error measurement can similarly compensate for other impairments that occur between the time the cells are programmed and the time the residual errors are measured. The MSP may measure the residual errors at any time after the cells were programmed, e.g., immediately after programming, several minutes or even years after programming. In some embodiments, the MSP may re-measure the residual errors after a certain period of time and update the stored error information. The MSP may run a background, low priority task that measures residual errors and updates error information during normal system operation.

In some embodiments, the MSP may encode the data stored in the data storage area using an Error Correction Code (ECC), which is able to correct a certain finite number of errors in a page. In these embodiments, the MSP may decide to measure the residual errors and store the error information when the number of errors corrected by the ECC approaches the correction capability of the code.

For example, assume the ECC is able to correct 30 errors per page or per sector. During normal operation, the MSP counts the number of errors corrected by the ECC. When the number of corrected errors reaches 25 (e.g., because of aging or other effects), the MSP measures the residual errors and stores the corresponding error information in the error storage area. When retrieving the data, the MSP first corrects some of the data bits using the retrieved error information, and only then provides the data to the ECC decoder. Thus, the effective correction capability of the code is increased considerably.

Additionally or alternatively, the data stored in the data storage area can be encoded with an error detection code. The MSP may decide to measure the residual errors and store the error information based on the number of errors detected by the error detection code. Thus, generally, the decision can be based on any suitable code that is able to detect errors in the stored data.

In some embodiments, the data storage area and error storage area may overlap. For example, when the memory cells comprise multi-level cells, the MSP may store data in one or more bits of the memory cells, and store error information in one or more other bits of the cells.

Although the embodiments described herein refer mainly to P&V processes that program an entire memory page simultaneously, the methods and systems described herein can also be used with other kinds of cell programming processes, whether or not they contain a verification stage. Such programming processes may perform simultaneous programming of any suitable group of cells, or even program each cell individually.

Although the embodiments described herein mainly address storing data in solid-state memory devices, the principles of the present invention can also be used for storing and retrieving data in Hard Disk Drives (HDD) and other data storage media and devices.

It will thus be appreciated that the embodiments described above are cited by way of example, and that the present invention is not limited to what has been particularly shown and described hereinabove. Rather, the scope of the present invention includes both combinations and sub-combinations of the various features described hereinabove, as well as variations and modifications thereof which would occur to persons skilled in the art upon reading the foregoing description and which are not disclosed in the prior art. 

1. A method for operating a memory that includes a plurality of analog memory cells, comprising: storing data in a first group of the memory cells by writing respective first cell values to the memory cells in the first group; after storing the data, reading respective second cell values from the memory cells in the first group, and finding differences between the respective first and second cell values for each of one or more of the memory cells in the first group; processing the differences to produce error information; and storing the error information in a second group of the memory cells.
 2. The method according to claim 1, wherein the second group of the memory cells is different from the first group.
 3. The method according to claim 1, wherein writing the first cell values and reading the second cell values comprise programming the memory cells of the first group in an iterative Program and Verify (P&V) process.
 4. The method according to claim 1, wherein processing the differences comprises quantizing the differences by mapping the differences to a finite set of difference indications, and wherein storing the error information comprises storing the quantized differences.
 5. The method according to claim 4, wherein processing the differences comprises adaptively controlling a size of the produced error information responsively to the quantized differences.
 6. The method according to claim 4, wherein storing the data comprises selecting the first cell values from a set of nominal values, and wherein the difference indications indicate whether the nominal values corresponding to the read second cell values differ from the respective nominal values corresponding to the written first cell values.
 7. The method according to claim 6, wherein, for a given first cell value that corresponds to a first nominal value and a given second cell value that corresponds to a second nominal value, the difference indications comprise at least one of: a first indication indicating that the first nominal value is lower than and adjacent to the second nominal value in the set of the nominal values; a second indication indicating that the first nominal value is greater than and adjacent to the second nominal value in the set of the nominal values; and a third indication indicating that the first nominal value is equal to the second nominal value.
 8. The method according to claim 1, wherein storing the error information comprises compressing the error information and storing the compressed error information.
 9. The method according to claim 1, wherein storing the error information comprises encoding the error information with an Error Correction Code (ECC) and storing the encoded error information.
 10. The method according to claim 1, wherein storing the error information comprises storing indices of the memory cells of the first group in which the differences were found.
 11. The method according to claim 1, wherein reading the second cell values and finding the differences are performed immediately after writing the first cell values.
 12. The method according to claim 1, wherein reading the second cell values and finding the differences are performed a predetermined time interval after writing the first cell values.
 13. The method according to claim 1, wherein the memory cells in the first group are subject to interference from a third group of the memory cells, and wherein reading the second cell values and finding the differences are performed after the memory cells in the third group have been programmed.
 14. The method according to claim 1, wherein reading the second cell values and finding the differences are performed responsively to an event.
 15. The method according to claim 1, and comprising retrieving the stored data by retrieving the error information from the second group of the memory cells, reading third cell values from the cells in the first group, and processing the third cell values responsively to the retrieved error information to produce corrected data.
 16. The method according to claim 15, wherein retrieving the stored data comprises making an attempt to reconstruct the data from the third cell values without the error information, and retrieving the error information and processing the third cell values responsively to the retrieved error information upon a failure of the attempt.
 17. The method according to claim 15, wherein storing the data comprises encoding the data with a code that detects errors in the data, and wherein retrieving the stored data comprises detecting the errors in the data using the code and updating the error information based on the third cell values when a number of the detected errors meets a predetermined condition.
 18. The method according to claim 17, wherein updating the error information is performed when the number of the detected errors exceeds a predetermined threshold.
 19. The method according to claim 1, wherein storing the data comprises programming the first memory cells using first programming parameters such that the error information has a first size, and comprising, after storing the error information: reading the error information from the second group of the memory cells, reading third cell values from the cells in the first group, and reconstructing the data by processing the third cell values responsively to the read error information; and re-programming the data using second programming parameters so as to produce refined error information having a second size, which is smaller than the first size.
 20. Apparatus for operating a memory that includes a plurality of analog memory cells, comprising: Read/Write (R/W) circuitry, which is coupled to store data in a first group of the memory cells by writing respective first cell values to the memory cells in the first group and, after storing the data, to read respective second cell values from the analog memory cells in the first group; and a processor, which is configured to find differences between the respective first and second cell values for each of one or more of the memory cells in the first group, to process the differences to produce error information and to store the error information in a second group of the memory cells.
 21. The apparatus according to claim 20, wherein the second group of the memory cells is different from the first group.
 22. The apparatus according to claim 20, wherein the R/W circuitry is coupled to program the memory cells of the first group in an iterative Program and Verify (P&V) process.
 23. The apparatus according to claim 20, wherein the processor is configured to quantize the differences by mapping the differences to a finite set of difference indications, and to store the quantized differences in the second group of the memory cells.
 24. The apparatus according to claim 23, wherein processing the differences comprises adaptively controlling a size of the produced error information responsively to the quantized differences.
 25. The apparatus according to claim 23, wherein the R/W circuitry is coupled to select the first cell values from a set of nominal values, and wherein the difference indications indicate whether the nominal values corresponding to the read second cell values differ from the respective nominal values corresponding to the written first cell values.
 26. The apparatus according to claim 25, wherein, for a given first cell value that corresponds to a first nominal value and a given second cell value that corresponds to a second nominal value, the difference indications comprise at least one of: a first indication indicating that the first nominal value is lower than and adjacent to the second nominal value in the set of the nominal values; a second indication indicating that the first nominal value is greater than and adjacent to the second nominal value in the set of the nominal values; and a third indication indicating that the first nominal value is equal to the second nominal value.
 27. The apparatus according to claim 20, wherein the processor is configured to compress the error information and to store the compressed error information.
 28. The apparatus according to claim 20, wherein the R/W circuitry is coupled to compare the respective first and second cell values to produce the differences, to compress the differences and to send the compressed differences to the processor.
 29. The apparatus according to claim 20, wherein the processor is configured to encode the error information with an Error Correction Code (ECC) and to store the encoded error information.
 30. The apparatus according to claim 20, wherein the processor is configured to store indices of the memory cells of the first group in which the differences were found.
 31. The apparatus according to claim 20, wherein the processor and the R/W circuitry are configured to read the second cell values and to find the differences immediately after writing the first cell values.
 32. The apparatus according to claim 20, wherein the processor and the R/W circuitry are configured to read the second cell values and to find the differences a predetermined time interval after writing the first cell values.
 33. The apparatus according to claim 20, wherein the memory cells in the first group are subject to interference from a third group of the memory cells, and wherein the processor and the R/W circuitry are configured to read the second cell values and to find the differences after the memory cells in the third group have been programmed.
 34. The apparatus according to claim 20, wherein the processor and the R/W circuitry are configured to read the second cell values and to find the differences responsively to an event.
 35. The apparatus according to claim 20, wherein the processor is configured to retrieve the stored data by retrieving the error information from the second group of the memory cells, reading third cell values from the cells in the first group, and processing the third cell values responsively to the retrieved error information to produce corrected data.
 36. The apparatus according to claim 35, wherein the processor is configured to make an attempt to reconstruct the data from the third cell values without the error information, and to retrieve the error information and process the third cell values responsively to the retrieved error information upon a failure of the attempt.
 37. The apparatus according to claim 35, wherein the processor is configured to encode the data with a code that detects errors in the data, to store the encoded data in the first group of the memory cells, and, when retrieving the stored data, to detect the errors in the data using the code and to update the error information based on the third cell values when the number of the detected errors meets a predetermined condition.
 38. The apparatus according to claim 37, wherein the processor is configured to update the error information when the number of the detected errors exceeds a predetermined threshold.
 39. The apparatus according to claim 29, wherein the processor is configured to run a background task that finds the differences and produces the error information.
 40. The apparatus according to claim 20, wherein the processor is configured to program the first memory cells using first programming parameters such that the error information has a first size, and, after storing the error information, to read the error information from the second group of the memory cells, to read third cell values from the cells in the first group, to reconstruct the data by processing the third cell values responsively to the read error information, and to re-program the data using second programming parameters so as to produce refined error information having a second size, which is smaller than the first size.
 41. Apparatus for data storage, comprising: a memory, which comprises a plurality of analog memory cells; Read/Write (R/W) circuitry, which is coupled to store data in a first group of the memory cells by writing respective first cell values to the memory cells in the first group and, after storing the data, to read respective second cell values from the analog memory cells in the first group; and a processor, which is configured to find differences between the respective first and second cell values for each of one or more of the memory cells in the first group, to process the differences to produce error information and to store the error information in a second group of the memory cells. 